# -*- coding: utf-8 -*-
#
# geXtras plugin for gedit
#
# See README for info or go to http://code.google.com/p/gextras/
#
# Copyright (c) 2010-2011, Simon Downes <simon@simondownes.co.uk>
#
# Licensed under the MIT License;
# A copy of the license is included in the LICENSE file accompanying this
# distribution or online at http://www.opensource.org/licenses/mit-license.php

import os

import gedit

from window_helper import geXtrasWindowHelper

class geXtrasPlugin( gedit.Plugin ):
   
   def __init__( self ):
      gedit.Plugin.__init__(self)
      self.name = 'gExtras'
      self.path = os.path.dirname( __file__ )
      self._instances = {}

   def activate( self, window ):
      self._instances[window] = geXtrasWindowHelper(self, window)

   def deactivate( self, window ):
      self._instances[window].deactivate()
      del self._instances[window]

   def update_ui( self, window ):
      self._instances[window].update_ui()

